package javaCode.chapter12.string_;

/**
 * @author 徐州城
 * @version 1.0
 */
public class StringExercise10 {
    String str = new String("hsp"); //在堆中 value指向池 hsp
    final char[] ch = {'j','a','v','a'}; //指向池中 java
    public void change(String str,char ch[]){
        str = "java";
        ch[0] = 'h';
    }

    public static void main(String[] args) {
        StringExercise10 str = new StringExercise10();
        str.change(str.str,str.ch);
        System.out.println(str.str + "and");
        System.out.println(str.ch);

    }
}
